package com.hspedu.exception_;

/**
 * @Author Stringzhua
 * @Date 2024/3/7 21:26
 * description: NullPointerException空指针异常
 */
public class NullPointerException {
    public static void main(String[] args) {
        String name = null;
        System.out.println("name = " + name.length());
//        Exception in thread "main" java.lang.NullPointerException
//        at com.hspedu.exception_.NullPointerException.main(NullPointerException.java:11)
    }
}
